// 统一管理用户相关接口
import request from '../../utils/request'
import type { loginForm, loginResData, userResData } from './type'

enum API {
  LOGIN_URL = '/user/login',
  USERINFO_URL = '/user/info'
}

// 对外暴露请求函数
export const reqLogin = (data: loginForm) => {
  return request.post<loginResData>(API.LOGIN_URL, data)
}
export const reqUserInfo = () => {
  return request.get<userResData>(API.USERINFO_URL)
}
